<?php

declare(strict_types=1);

namespace App\CustHub\Model;

use Mine\MineModel;

/**
 * @property int $id 主键ID
 * @property int $uid 
 * @property int $main_uid 
 * @property int $app_type 应用类型：0=全部 1=指定
 * @property int $scope_type 微号范围：0=企微 1=个微
 * @property array $scope_ids 微号ID列表，JSON 格式
 * @property int $trigger_when_customer_delete 当客户将微号删除时是否触发：0=否 1=是
 * @property int $trigger_when_blacklisted 当客户拉黑微号时是否触发：0=否 1=是
 * @property int $schedule_delete 是否开启定时删除：0=否 1=是
 * @property string $schedule_start_time 定时删除开始时间
 * @property string $schedule_end_time 定时删除结束时间
 * @property int $delete_interval_min 删除间隔最小秒数
 * @property int $delete_interval_max 删除间隔最大秒数
 * @property int $delete_lost_enabled 已流失客户删除是否启用：0=否 1=是
 * @property int $delete_lost_limit 已流失客户删除上限，0=不限
 * @property int $delete_blacklist_enabled 黑名单客户删除是否启用：0=否 1=是
 * @property int $delete_blacklist_limit 黑名单客户删除上限，0=不限
 * @property int $send_msg_before_delete 删除前是否发送消息：0=否 1=是
 * @property array $send_msg_before_delete_content 删除前发送的消息内容
 * @property int $send_friend_request_on_delete 删除时是否发送好友申请：0=否 1=是
 * @property array $send_friend_request_content 好友申请备注内容
 * @property \Carbon\Carbon $created_at 创建时间
 * @property \Carbon\Carbon $updated_at 更新时间
 */
class ChOneWayContactSetting extends MineModel
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'ch_one_way_contact_setting';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'uid', 'main_uid', 'app_type', 'scope_type', 'scope_ids', 'trigger_when_customer_delete', 'trigger_when_blacklisted', 'schedule_delete', 'schedule_start_time', 'schedule_end_time', 'delete_interval_min', 'delete_interval_max', 'delete_lost_enabled', 'delete_lost_limit', 'delete_blacklist_enabled', 'delete_blacklist_limit', 'send_msg_before_delete', 'send_msg_before_delete_content', 'send_friend_request_on_delete', 'send_friend_request_content', 'created_at', 'updated_at'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'uid' => 'integer', 'main_uid' => 'integer', 'app_type' => 'integer', 'scope_type' => 'integer', 'scope_ids' => 'array', 'trigger_when_customer_delete' => 'integer', 'trigger_when_blacklisted' => 'integer', 'schedule_delete' => 'integer', 'delete_interval_min' => 'integer', 'delete_interval_max' => 'integer', 'delete_lost_enabled' => 'integer', 'delete_lost_limit' => 'integer', 'delete_blacklist_enabled' => 'integer', 'delete_blacklist_limit' => 'integer', 'send_msg_before_delete' => 'integer', 'send_msg_before_delete_content' => 'array', 'send_friend_request_on_delete' => 'integer', 'send_friend_request_content' => 'array', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}
